package top.jiangqiang.crawler.core.http.entities.body;

import lombok.Getter;
import top.jiangqiang.crawler.core.http.constants.ContentType;

import java.util.HashMap;
import java.util.Map;

@Getter
public class FormBody implements HttpBody<String> {
    private final String contentType = ContentType.FORM_URLENCODED.getValue();
    private final Map<String, String> data = new HashMap<>();

    public void addParam(String key, String value) {
        data.put(key, value);
    }

    public String getParam(String key) {
        return data.get(key);
    }
}
